import java.util.Scanner;

public class IfDemo08 {
    public static void main(String[] args) {
        System.out.println("欢迎来到地狱计算器");
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个整数：");

        float x = scanner.nextInt();
        System.out.println("请输入一个运算符：");
        String op = scanner.next();

        System.out.println("请输入一个整数：");
        float y = scanner.nextInt();
        if ("+".equals(op)) {
            System.out.println(x + op + y + "=" + (x + y));// 1+1=2
        } else if ("-".equals(op)) {
            System.out.println(x + op + y + "=" + (x - y));
        } else if ("*".equals(op)) {
            System.out.println(x + op + y + "=" + (x * y));
        } else if ("/".equals(op)) {
            System.out.println(x + op + y + "=" + (x / y));
        } else if ("%".equals(op)) {
            System.out.println(x + op + y + "=" + (x % y));
        } else {
            System.out.println("非法运算符");
        }
    }
}
